using System;
using System.Collections.Generic;
using System.ServiceModel.Description;
using System.Text;

namespace Sinacor.Infra.UI.Security.Services
{
    /// <summary>
    /// Add a <see cref="Sinacor.Infra.UI.Security.Services.ClientAuthenticationMessageInspector"/>
    /// to the client.
    /// </summary>
    public class SinacorClientEndPointBehavior : IEndpointBehavior
    {
        #region Public Methods

        #region IEndpointBehavior Members

        /// <summary>
        /// 
        /// </summary>
        /// <param name="endpoint"></param>
        /// <param name="bindingParameters"></param>
        public void AddBindingParameters(ServiceEndpoint endpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="endpoint"></param>
        /// <param name="clientRuntime"></param>
        public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime)
        {
            clientRuntime.MessageInspectors.Add(new SinacorClientMessageInspector());
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="endpoint"></param>
        /// <param name="endpointDispatcher"></param>
        public void ApplyDispatchBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="endpoint"></param>
        public void Validate(ServiceEndpoint endpoint)
        {
        }

        #endregion

        #endregion
    }
}
